﻿using Autodesk.Revit.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media.Imaging;

namespace HellowRevit
{
    public class Class1 : IExternalApplication
    {
        public Result OnShutdown(UIControlledApplication application)
        {
            return Result.Succeeded;
            throw new NotImplementedException();
        }

        public Result OnStartup(UIControlledApplication application)
        {
            RibbonPanel ribbon = application.CreateRibbonPanel("new buuton");
            PulldownButton button = ribbon.AddItem(new PulldownButtonData("Components house", "Components house")) as PulldownButton;
            PushButton allThing = button.AddPushButton(new PushButtonData("components", "Components", @"C:\Users\Lenovo\source\repos\component\component\bin\Debug\component.dll", "component.listing")) ;
            Uri uri = new Uri(@"E:\html work\img\logo.png");
            BitmapImage bitmapImage = new BitmapImage(uri);
            button.LargeImage = bitmapImage;
            return Result.Succeeded;
            throw new NotImplementedException();
        }
    }
}
